package lumis.content.workflow.serialization;

import lumis.portal.principal.PrincipalConfig;

/**
 * Serializable value object for Workflow permission structure properties
 *
 * @version $Revision: 10458 $ $Date: 2009-06-02 15:49:09 -0300 (Tue, 02 Jun 2009) $
 * @since 4.0.8
 */
public class WorkflowPermissionSerializableConfig
{
	private String id;
	private int principalType = PrincipalConfig.TYPE_GROUP;
	private String channelId = null;
	private boolean external = false;

	public String getId()
	{
		return id;
	}
	public void setId(String id)
	{
		this.id = id;
	}

	public int getPrincipalType()
	{
		return principalType;
	}
	
	public void setPrincipalType(int principalType)
	{
		this.principalType = principalType;
	}
	public String getChannelId()
	{
		return channelId;
	}
	public void setChannelId(String channelId)
	{
		this.channelId = channelId;
	}
	
	/**
	 * Returns if the principal is external to the channel being exported.
	 * 
	 * @return true if the principal is external.
	 * @since 4.2.1
	 */
	public boolean isExternal()
	{
		return external;
	}
	
	/**
	 * Sets whether the principal is external to the channel being exported.
	 * 
	 * @param external
	 * @since 4.2.1
	 */
	public void setExternal(boolean external)
	{
		this.external = external;
	}
}
